$().ready (function(){
    if (!$.support.leadingWhitespace) {
    }
    else if(!isMobile.any() && !isTablet.any()){
      $("#videoContainer").mb_YTPlayer();
      $(".landingDiv").css("position","absolute");
      $(".noDesktopImage").remove();
    }
 });
 
 $(window).load(function() {
    if ($.support.leadingWhitespace && !isMobile.any()) {
        initLandigTextEvents();
    }
});
 
function initLandigTextEvents(){
     var width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
     if(isMobile.any()){
     }
     else{
        $(".landingDiv").css("top",0);
        $(".landingDiv").height($("#wrapper_mbYTP_videoContainer").height());
        $( window ).resize(function() {
            $(".landingDiv").height($("#wrapper_mbYTP_videoContainer").height());
        });
     }
 }
 
 var isMobile = {
    Android: function() {
        return navigator.userAgent.match(/Android/i);
    },
    BlackBerry: function() {
        return navigator.userAgent.match(/BlackBerry/i);
    },
    iOS: function() {
        return navigator.userAgent.match(/iPhone|iPod/i);
    },
    Opera: function() {
        return navigator.userAgent.match(/Opera Mini/i);
    },
    Windows: function() {
        return navigator.userAgent.match(/IEMobile/i);
    },
    any: function() {
        return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
    }
};

var isTablet = {
    any: function() {
        return navigator.userAgent.match(/iPad/);
    }
};